package com.example.backend.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.backend.entity.CaiPin;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.List;

@Repository
public interface CaiPinMapper extends BaseMapper<CaiPin> {
    @Select("select * from wm_cp where sjid = #{sjid}")
    public ArrayList<CaiPin> queryCaiPinBySjid(Integer sjid);

    @Select("select * from wm_cp where sjid = (select sjid from wm_sj where yhid = #{yhid})")
    List<CaiPin> queryCaiPinByYhid(Integer yhid);


}
